<template>
  <div class="goodDesc">
    <myheader>
      <template #left><span @click="$router.back()">返回</span></template>
    </myheader>
    <goodsbox>
        <template #top>
            {{goodsList.title}}
        </template>
        <template #mid>
        <div class="mid"></div>
      </template>
      <template #bottom>
          <div class="cont" v-html="goodsList.content">    
          </div>
          </template> 
    </goodsbox>
  </div>
</template>

<script>
import myheader from "@/components/myheader";
import { getGoodsDetial } from "@/apis/goods";
import goodsbox from "@/components/goodsbox";
export default {
  data () {
      return {
      goodsList:[]    
      }
  },  
  components: {
    myheader,goodsbox
  },
  mounted() {
    getGoodsDetial(this.$route.params.id).then((res) => {
      console.log(res);
      this.goodsList = res.data.message[0]
      console.log(this.goodsList);
    });
  },
};
</script>

<style lang="less" scoped>
.mid {
    width: 100%;
    height: 2px;
    margin-top: 20px;
    margin-bottom: 20px;
    background-color: #ccc;
  }
  
/deep/ .gomeImgLoad{
        width: 100%;
 }
</style>